<template>
	<div style="padding: 20px">
		<div style="margin-bottom: 10px">
			<el-button type="primary" plain icon="el-icon-plus" size="mini"
				>新增</el-button
			>
		</div>
		<el-table :data="list" style="width: 100%" v-loading="loading">
			<el-table-column prop="date" label="日期" align="center">
			</el-table-column>
			<el-table-column label="日期" align="center">
				<template slot-scope="{ row }">
					<div>{{ row }}</div>
				</template>
			</el-table-column>
		</el-table>
		<div id="editor"></div>
		<el-button @click="submit">提交</el-button>
    <pagination
      v-show="ruleForm.total>0"
      :total="ruleForm.total"
      :page.sync="ruleForm.pageNum"
      :limit.sync="ruleForm.pageSize"
      @pagination="()=>{}"
    />
		<el-dialog title="提示" :visible.sync="dialogVisible" width="500px">
			<el-form
				:model="ruleForm"
				:rules="rules"
				ref="ruleForm"
				label-width="100px"
				class="demo-ruleForm"
			>
				<el-form-item label="活动名称" prop="name">
					<el-input v-model="ruleForm.name"></el-input>
				</el-form-item>
			</el-form>
			<span slot="footer" class="dialog-footer">
				<el-button @click="dialogVisible = false">取 消</el-button>
				<el-button type="primary" @click="dialogVisible = false"
					>确 定</el-button
				>
			</span>
		</el-dialog>
	</div>
</template>

<script>
// import { } from "@/api/card/home";
export default {
	data() {
		return {
			loading: false,
			dialogVisible: false,
			list: [],
			ruleForm: {
				pageNum: 1,
				pageSize: 10,
				total: 0,
			},
			rules: {
				name: [
					{
						required: true,
						message: '请输入活动名称',
						trigger: 'blur',
					},
				],
			},
		}
	},
	methods: {
		submit() {
			console.log(this.quill.root.innerHTML)
		},
		//切换分页
		handleCurrentChange(val) {
			this.loading = true
			this.ruleForm.pageNum = val
		},
		//切换总条数
		handleSizeChange(val) {
			this.loading = true
			this.ruleForm.pageSize = val
		},
	},
	created() {},
}
</script>

<style lang="scss" scoped></style>
